package com.gwd.task.repository;

import com.gwd.task.entity.ProjectEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

/**
 * @author zhiyongming
 * @date 2020/11/19 14:39
 */
@Repository
public interface ProjectRepository extends JpaRepository<ProjectEntity, Long>, JpaSpecificationExecutor<ProjectEntity> {
    int countByGroupIdAndProjectName(Long groupId, String projectName);

    int countByGroupIdAndProjectNameAndProjectIdNot(Long groupId, String projectName, Long projectId);
}
